<?php

/**
* @author trungdt
* @since Feb 2011
* 
*/
/**
* Change logs
* Feb 11, 2011 - trungdt - Add views FeatureTab, so, we must add configure that LinkList module will automatic remove html of body field
* Sep 22, 2011 - trungdt - Add No_search support
* 
*                ALTER TABLE `ag_linklistmodule_config` ADD `remove_body_html` INT( 1 ) NOT NULL DEFAULT '0' COMMENT '=0: No remove, =1: remove'
* 
* Sep 6, 2011 - trungdt - Add config: show Default view when in Administrator mode or not
* 
*    
*/

class bannermediamodule_config{
	function form($object) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->ewidth = 150;
			$object->eheight=150;
			$object->iwidth=100;
			$object->iheight=100;
		} 
        else
        {
			$form->meta('id',$object->id);
		}
		//config
            $form->register('ewidth','External Width', new textcontrol($object->ewidth));
            $form->register('eheight','External Height', new textcontrol($object->eheight));
            $form->register('iwidth','Internal Width', new textcontrol($object->iwidth));
            $form->register('iheight','Internal Height', new textcontrol($object->iheight));
        //end config
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
		$object->ewidth = intval($values['ewidth']);
        $object->eheight = intval($values['eheight']);
        $object->iwidth = intval($values['iwidth']);
        $object->iheight = intval($values['iheight']);
		return $object;
	}
}

?>